package com.ruoyi.recycle.dto;

import cn.hutool.core.date.DateUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.Date;
import java.util.List;

/**
 * 引流门店管理对象 shop_management
 * 
 * @author Wubk
 * @date 2022-05-21
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
public class ShopManagementDTO 
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    @ApiModelProperty(name = "id", value = "引流门店管理id", dataType = "Long")
    private Long id;

    /** 店铺名称 */
    @Excel(name = "店铺名称")
    @ApiModelProperty(name = "shopName", value = "店铺名称", dataType = "String")
    private String shopName;

    /** 店主姓名 */
    @Excel(name = "店主姓名")
    @ApiModelProperty(name = "name",value = "店主姓名",dataType = "String")
    private String name;

    /** 手机号 */
    @Excel(name = "手机号")
    @ApiModelProperty(name = "phone",value = "手机号",dataType = "String")
    private String phone;

    /** 积分 */
    @Excel(name = "积分")
    @ApiModelProperty(name = "integral",value = "积分",dataType = "Long")
    private Long integral;

    /** 类型 */
    @Excel(name = "类型")
    @ApiModelProperty(name = "type",value = "类型",dataType = "String")
    private String type;

    /** 提交时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "提交时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(name = "submitTime",value = "提交时间",dataType = "Date",notes = "yyyy-MM-dd")
    private Date submitTime;

    /** 账号 */
    @Excel(name = "账号")
    @ApiModelProperty(name = "shopNumber",value = "账号",dataType = "String")
    private String shopNumber;

    /** 密码 */
    @Excel(name = "密码")
    @ApiModelProperty(name = "shopPassword",value = "密码",dataType = "String")
    private String shopPassword;

    /** 证件资料-营业执照 */
    @Excel(name = "证件资料-营业执照")
    @ApiModelProperty(name = "shopBusinessLicense",value = "证件资料-营业执照",dataType = "String")
    private String shopBusinessLicense;

    /** 证件资料-身份证正面 */
    @Excel(name = "证件资料-身份证正面")
    @ApiModelProperty(name = "shopIdentityCardFront",value = "证件资料-身份证正面",dataType = "String")
    private String shopIdentityCardFront;

    /** 证件资料-身份证反面 */
    @Excel(name = "证件资料-身份证反面")
    @ApiModelProperty(name = "shopIdentityCardReverse",value = "证件资料-身份证反面",dataType = "String")
    private String shopIdentityCardReverse;

    /** 证件资料 */
    @Excel(name = "证件资料-其他资料")
    @ApiModelProperty(name = "shopImg",value = "证件资料-其他资料",dataType = "String")
    private String shopImg;

    /** 状态 */
    @Excel(name = "状态")
    @ApiModelProperty(name = "status",value = "状态",dataType = "String")
    private String status;

    /** 微信标识 */
    @Excel(name = "微信标识")
    @ApiModelProperty(name = "openid",value = "微信标识",dataType = "String")
    private String openid;

    /** 创建人 */
    @Excel(name = "创建人")
    @ApiModelProperty(name = "createdBy",value = "创建人",dataType = "String")
    private String createdBy;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(name = "createdTime",value = "创建时间",dataType = "Date",notes = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdTime;

    /** 更新人 */
    @Excel(name = "更新人")
    @ApiModelProperty(name = "updatedBy",value = "更新人",dataType = "String")
    private String updatedBy;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(name = "updatedTime", value = "更新时间", dataType = "Date", notes = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedTime;

    /**
     * 地球经度
     */
    @Excel(name = "地球经度")
    @ApiModelProperty(name = "longitude", value = "地球经度", dataType = "Double")
    private Double longitude;
    @ApiModelProperty(name = "salesmanId", value = "业务员ID", dataType = "Long")
    private Long salesmanId;
    @ApiModelProperty(name = "salesmanName", value = "业务员姓名", dataType = "String")
    private String salesmanName;

    /**
     * 地球纬度
     */
    @Excel(name = "地球纬度")
    @ApiModelProperty(name = "latitude", value = "地球纬度", dataType = "Double")
    private Double latitude;

    /**
     * 详细地址
     */
    @Excel(name = "详细地址")
    @ApiModelProperty(name = "shopAddress", value = "详细地址", dataType = "String")
    private String shopAddress;

    @ApiModelProperty(name = "merchantId", value = "综合站ID", dataType = "Long")
    private Long merchantId;

    @ApiModelProperty(name = "distance", value = "门店离当前自己的距离（KM）", dataType = "Double")
    private Double distance;

    @ApiModelProperty(name = "collectFlag", value = "客户是否已收藏店铺(0否，1是)", dataType = "Integer")
    private Integer collectFlag;

    private Integer currentPage = 1;

    private Integer pageSize = 10;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date searchTimeBegin;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date searchTimeEnd;

    @ApiModelProperty(name = "headPortrait", value = "门店头像", dataType = "String")
    private String headPortrait;

    @ApiModelProperty(name = "promotionImg", value = "推广图片，多个图片以;分割", dataType = "String")
    private String promotionImg;

    @ApiModelProperty(name = "businessTime", value = "营业时间", dataType = "String")
    private String businessTime;

    @ApiModelProperty(name = "labels", value = "门店标签；多个标签以;号切割", dataType = "String")
    private String labels;

    @ApiModelProperty(name = "couponList", value = "门店对应的优惠券列表", dataType = "String")
    private List<CouponDto> couponList;


    public void setSearchTimeEnd(Date searchEnd) {
        this.searchTimeEnd = DateUtil.offsetSecond(searchEnd, 86399).toJdkDate();

    }
}
